package com.ailesson.video.service;

import com.ailesson.video.dto.CourseDto;
import com.ailesson.video.model.reply.CoursePublishReply;
import com.ailesson.video.model.reply.CourseReply;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ailesson.common.reply.PageResult;
import com.ailesson.video.entity.CourseEntity;
import com.ailesson.video.model.req.CourseQueryReq;
import com.ailesson.video.model.req.CourseReq;

import java.util.List;
import java.util.Map;

/**
 * 课程
 *
 * @author mac
 * @email mac@gmail.com
 * @date 2024-09-30 21:55:20
 */
public interface CourseService extends IService<CourseEntity> {

    /**
     * 分页查询
     * @param params
     * @return
     */
    PageResult queryPage(CourseQueryReq params);

    /**
     * 查询信息
     * @param id
     * @return
     */
    CourseReply info(Long id,boolean isDescript);

    /**
     * 更新信息
     * @param course
     */
    void update(CourseReq course);

    /**
     * 新增
     * @param course
     */
    Long add(CourseReq course);

    void deleteById(Long id);

    CoursePublishReply getCoursePublishById(Long id);

    void publishCourse(Long id);

    List<CourseDto> findByKeyword(String keyword);

    Map<String, Object> getInfoById(Long courseId);
}

